package com.bes.sdk.message;

public class ActivityConfigSummaryInfo {
    String activityIndex;
    String activityIdentity;
    String activityCatalog;
    String activityType;
    String activityTime;
    String maxHR;
    String minHR;
    String paceSpeed;
    String averageSpeed;
    String duration;
    String totalCalories;
    String totalSteps;
    String totalDistance;

    public ActivityConfigSummaryInfo(){

    }

    public ActivityConfigSummaryInfo(String activityIndex,String activityIdentity,String activityCatalog,String activityType,
                                     String activityTime,String maxHR,String minHR,String paceSpeed,String averageSpeed,String duration,
                                     String totalCalories,String totalSteps,String totalDistance) {
        this.activityIndex = activityIndex;
        this.activityIdentity = activityIdentity;
        this.activityCatalog = activityCatalog;
        this.activityType = activityType;
        this.activityTime = activityTime;
        this.maxHR = maxHR;
        this.minHR = minHR;
        this.paceSpeed = paceSpeed;
        this.averageSpeed = averageSpeed;
        this.duration = duration;
        this.totalCalories = totalCalories;
        this.totalSteps = totalSteps;
        this.totalDistance = totalDistance;

    }

    public ActivityConfigSummaryInfo(String str){

        String[] parts = str.split(":");

        // 将分割后的字符串数组中的元素存入变量
        activityIndex = parts[0];
        activityIdentity = parts[1];
        activityCatalog = parts[2];
        activityType = parts[3];
        activityTime = parts[4];
        maxHR = parts[5];
        minHR = parts[6];
        paceSpeed = parts[7];
        averageSpeed = parts[8];
        duration = parts[9];
        totalCalories = parts[10];
        totalSteps = parts[11];
        totalDistance = parts[12];
    }
    @Override
    public String toString() {

        StringBuilder stringBuilder = new StringBuilder();

        String[] stringsToJoin = {activityIndex, activityIdentity, activityCatalog, activityType, activityTime, maxHR,
                minHR, paceSpeed, averageSpeed, duration, totalCalories, totalSteps, totalDistance};
        for (int i = 0; i < stringsToJoin.length; i++) {
            if (i > 0) {
                stringBuilder.append(":");
            }
            stringBuilder.append(stringsToJoin[i]);
        }

        String result = stringBuilder.toString();

        return result;
    }

    public String getActivityIndex() {
        return activityIndex;
    }

    public void setActivityIndex(String activityIndex) {
        this.activityIndex = activityIndex;
    }

    public String getActivityIdentity() {
        return activityIdentity;
    }

    public void setActivityIdentity(String activityIdentity) {
        this.activityIdentity = activityIdentity;
    }

    public String getActivityCatalog() {
        return activityCatalog;
    }

    public void setActivityCatalog(String activityCatalog) {
        this.activityCatalog = activityCatalog;
    }

    public String getActivityType() {
        return activityType;
    }

    public void setActivityType(String activityType) {
        this.activityType = activityType;
    }

    public String getActivityTime() {
        return activityTime;
    }

    public void setActivityTime(String activityTime) {
        this.activityTime = activityTime;
    }

    public String getMaxHR() {
        return maxHR;
    }

    public void setMaxHR(String maxHR) {
        this.maxHR = maxHR;
    }

    public String getMinHR() {
        return minHR;
    }

    public void setMinHR(String minHR) {
        this.minHR = minHR;
    }

    public String getPaceSpeed() {
        return paceSpeed;
    }

    public void setPaceSpeed(String paceSpeed) {
        this.paceSpeed = paceSpeed;
    }

    public String getAverageSpeed() {
        return averageSpeed;
    }

    public void setAverageSpeed(String averageSpeed) {
        this.averageSpeed = averageSpeed;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getTotalCalories() {
        return totalCalories;
    }

    public void setTotalCalories(String totalCalories) {
        this.totalCalories = totalCalories;
    }

    public String getTotalSteps() {
        return totalSteps;
    }

    public void setTotalSteps(String totalSteps) {
        this.totalSteps = totalSteps;
    }

    public String getTotalDistance() {
        return totalDistance;
    }

    public void setTotalDistance(String totalDistance) {
        this.totalDistance = totalDistance;
    }
}
